package com.maya.medicalwastes.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.maya.medicalwastes.R;
import com.maya.medicalwastes.bean.WareHouseItemBean;
import com.maya.medicalwastes.bean.WarehouseBean;
import com.maya.medicalwastes.entity.KeyBean;

import java.util.List;

/**
 * @author created by fuguoyong
 * 版本：1.0
 * 创建日期：2020-11-19 13
 * 描述：CollectListAdapter
 */
public class WareHouseListAdapter extends BaseQuickAdapter<WareHouseItemBean, BaseViewHolder> {

    public WareHouseListAdapter(int layoutResId, @Nullable List<WareHouseItemBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, WareHouseItemBean item) {
        helper.setText(R.id.tv_type, item.getWarehouseName());
        if (item.isCheck()) {
            helper.setTextColor(R.id.tv_type, mContext.getResources().getColor(R.color.colorReceiveText));
        } else {
            helper.setTextColor(R.id.tv_type, mContext.getResources().getColor(R.color.gray_3));

        }
        helper.addOnClickListener(R.id.tv_type);
    }
}
